﻿using System;
using System.Collections.Generic;
using System.Text;

using Castle.ActiveRecord;
using Castle.Components.Validator;
using MiragePWF.NH.Validation;
using Wolfut.MirageEE.Kernal.Common;
using Wolfut.MirageEE.Domain.CommonUtilities;


namespace Wolfut.MirageEE.Domain.Procurement
{
    //采购入库信息
    [ActiveRecord]
    public class POBillInStockDetail : PersistentObjectWithGuid
    {
        #region 采购单ID
        [Property]
        [ValidateNonEmpty, ValidateLength(0, 40, "采购单ID超长")]
        public virtual string PurchaseBillID
        {
            get
            {
                return purchaseBillID;
            }
            set
            {
                purchaseBillID = value;
            }
        }
        private string purchaseBillID;
        #endregion

        #region 商品ID
        [Property]
        [ValidateNonEmpty, ValidateLength(0, 40, "商品ID超长")]
        public virtual string ProductID
        {
            get
            {
                return productID;
            }
            set
            {
                productID = value;
            }
        }
        private string productID;
        #endregion

        #region 采购订单号
        [Property]
        [ValidateNonEmpty,ValidateLength(0, 100, "采购订单号超长")]
        public virtual string PurchaseOrderCode
        {
            get
            {
                return purchaseOrderCode;
            }
            set
            {
                purchaseOrderCode = value;
            }
        }
        private string purchaseOrderCode;
        #endregion

        #region 采购订单ID
        [Property]
        [ValidateNonEmpty,ValidateLength(0, 40, "采购订单ID超长")]
        public virtual string PurchaseOrderID
        {
            get
            {
                return purchaseOrderID;
            }
            set
            {
                purchaseOrderID = value;
            }
        }
        private string purchaseOrderID;
        #endregion

        #region 采购类别
        [Property]
        [ValidateLength(0, 100, "采购类别超长")]
        public virtual string PurchaseCategory
        {
            get
            {
                return purchaseCategory;
            }
            set
            {
                purchaseCategory = value;
            }
        }
        private string purchaseCategory;
        #endregion

        #region 科目ID
        [Property]
        [ValidateNonEmpty, ValidateLength(0, 40, "科目ID超长")]
        public virtual string SubjectID
        {
            get
            {
                return subjectID;
            }
            set
            {
                subjectID = value;
            }
        }
        private string subjectID;
        #endregion

        #region 仓库ID
        [Property]
        [ValidateNonEmpty, ValidateLength(0, 40, "仓库ID超长")]
        public virtual string WarehouseID
        {
            get
            {
                return warehouseID;
            }
            set
            {
                warehouseID = value;
            }
        }
        private string warehouseID;
        #endregion

        #region 数量
        [Property]        
        public virtual decimal Quantity
        {
            get
            {
                return quantity;
            }
            set
            {
                quantity = value;
            }
        }
        private decimal quantity;
        #endregion

        #region 单价
        [Property]
        public virtual decimal UnitPrice
        {
            get
            {
                return unitPrice;
            }
            set
            {
                unitPrice = value;
            }
        }
        private decimal unitPrice;
        #endregion

        #region 单价类别
        [Property]
        [ValidateLength(0, 40, "单价类别超长")]
        public virtual string UnitPriceCategory
        {
            get
            {
                return unitPriceCategory;
            }
            set
            {
                unitPriceCategory = value;
            }
        }
        private string unitPriceCategory;
        #endregion

        #region 折扣率
        [Property]
        public virtual decimal DiscountRate
        {
            get
            {
                return discountRate;
            }
            set
            {
                discountRate = value;
            }
        }
        private decimal discountRate;
        #endregion

        #region 折扣额
        [Property]
        public virtual decimal DiscountAmount
        {
            get
            {
                return discountAmount;
            }
            set
            {
                discountAmount = value;
            }
        }
        private decimal discountAmount;
        #endregion

        #region 税率
        [Property]
        public virtual decimal TaxRate
        {
            get
            {
                return taxRate;
            }
            set
            {
                taxRate = value;
            }
        }
        private decimal taxRate;
        #endregion

        #region 税额
        [Property]
        public virtual decimal TaxAmount
        {
            get
            {
                return taxAmount;
            }
            set
            {
                taxAmount = value;
            }
        }
        private decimal taxAmount;
        #endregion

        #region 采购额
        [Property]
        public virtual decimal PurchaseAmount
        {
            get
            {
                return purchaseAmount;
            }
            set
            {
                purchaseAmount = value;
            }
        }
        private decimal purchaseAmount;
        #endregion 

        #region 金额
        [Property]
        public virtual decimal TotalAmount
        {
            get
            {
                return totalAmount;
            }
            set
            {
                totalAmount = value;
            }
        }
        private decimal totalAmount;
        #endregion

        #region 是否删除
        [Property]
        [ValidateNonEmpty]
        public virtual bool IsDeleted
        {
            get
            {
                return isDeleted;
            }
            set
            {
                isDeleted = value;
            }
        }
        private bool isDeleted;
        #endregion
    }
}
